package cn.quevo.cube.provide.define.service.impl;

import cn.quevo.common.entity.PageResult;
import cn.quevo.cube.provide.define.dao.CubeColumnExtDao;
import cn.quevo.cube.provide.define.entity.CubeColumnExt;
import cn.quevo.cube.provide.define.entity.query.CubeColumnExtQuery;
import cn.quevo.cube.provide.define.service.CubeColumnExtService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 字段扩展信息 Service接口实现
 *
 * @author July july_sky@foxmail.com
 * @version 1.0
 * @date 2018/12/11 14:51:17
 * @Copyright 东方浩星（北京）传媒科技有限公司版权所有.All Rights Reserved.
 */
@Service("cubeColumnExtService")
@Transactional(transactionManager="transactionManager",rollbackFor={Exception.class})
public class CubeColumnExtServiceImpl implements CubeColumnExtService {
    @Resource(name="cubeColumnExtDao")
    private CubeColumnExtDao cubeColumnExtDao;

    @Override
    public Map<String,Object> getSinge(CubeColumnExtQuery cubeColumnExtQuery) {
        return this.cubeColumnExtDao.getSinge(cubeColumnExtQuery);
    }

    @Override
    public Integer create(CubeColumnExt cubeColumnExt) {
        cubeColumnExt.validateCreate();
        return this.cubeColumnExtDao.create(cubeColumnExt);
    }

    @Override
    public Integer update(CubeColumnExt cubeColumnExt) {
        cubeColumnExt.validateUpdate();
        return this.cubeColumnExtDao.update(cubeColumnExt);
    }

    @Override
    public PageResult<Map<String,Object>> getPage(CubeColumnExtQuery cubeColumnExtQuery) {
        return this.cubeColumnExtDao.getPage(cubeColumnExtQuery);
    }
}
